package com.s63.ssm.advice;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class LoggerAdvice {

    @Pointcut("execution(* com.s63.ssm.service..*.*(..))")
    public void pc() {}

    @Before(value = "pc()")
    public void before(JoinPoint joinPoint) {
        System.out.println("前置增强开始");
        System.out.println("方法：" + joinPoint.getSignature().getName());
        System.out.println("前置增强结束");
    }
}
